FROM java:8
VOLUME /tmp
ENV TZ=Asia/Shanghai
ADD build/libs/*.jar  app.jar
ENV JAVA_OPTS=""
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar

##拉取java的基础镜像为：openjdk
#FROM java:8
#ENV TZ=Asia/Shanghai
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#ADD ./target/springboot-demo-0.1.jar app.jar
#ENTRYPOINT ["java","-jar","app.jar"]